home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / BARNET / COMPILER / GUAVAC / !Guavac / doc / RO-FAQ < prev    next >
Text File  |  1998-05-30  |  7KB  |  188 lines

  1.  
  2. This is the Risc OS guavac FAQ
  3. Peter Naulls, May 30th, 1998
  4. pnaulls@usa.net
  5.  
  6.  
  7.   guavac refers to the Acorn Risc OS port of guavac, a Java source compiler,
  8.   distributed under a GNU license, and ported by myself to Risc OS.
  9.   The version referred to by this FAQ is 1.0, Risc OS release 1.2.
  10.   guavac is sometimes also referred to as !Guavac.
  11.  
  12.   !Java refers to Acorn's 1.0.2 port of Sun's JVM to Risc OS.
  13.  
  14.   javac is the Java compiler as distributed as part of Sun's Java
  15.   Development Kit.
  16.  
  17.  
  18. 1.  Who's responsible for errors and emmisions in this FAQ?
  19. 2.  Where can I get the latest version of guavac from?
  20. 3.  I'm using Risc OS 3.5 or 3.6 and guavac complains "Cannot allocate memory".
  21. 4.  Why does guavac complain "No writable memory at this address"?
  22. 5.  guavac says my source file is not a plain file or invalid source file,
  23.     what's wrong?
  24. 6.  I've compiled my program, but !Java says it can't find my class, what's
  25.     going wrong?
  26. 7.  What is the format of the Java$ClassPath variable, and when do I need
  27.     to set it?
  28. 8.  Why will javac compile some things, but not guavac?
  29. 9.  Why will guavac compile some things, but not javac?
  30. 10. Why doesn't guavac do <<insert Risc OS bug/feature>>?
  31. 11. Why doesn't throwback work?
  32. 12. Is there a multi-tasking front end to guavac?
  33. 13. What's a good book on to learn Java from?
  34. 14. What other Risc OS Java-related programs are available?
  35. 15. Where can I find more Risc OS related Java programming information?
  36.  
  37.  
  38.  
  39. 1.  Who's responsible for errors and emmisions in this FAQ?
  40.  
  41. A.  I (Peter Naulls) take full responsibilty, and no blame should be
  42.     placed on employees of Acorn or Sun Microsystems.  Corrections and
  43.     additions are of course gratefully received.
  44.  
  45.  
  46. 2.  Where can I get the latest version of guavac from?
  47.  
  48. A.  The Risc OS guavac homepage is: http://chocky.home.ml.org/java/guavac/
  49.     guavac (although not always the most recent version), may be found
  50.     at ftp://freenet.barnet.ac.uk/pub/Acorn/compilers/.
  51.  
  52.  
  53. 3.  I'm using Risc OS 3.5 or 3.6 and guavac complains "Cannot allocate memory".
  54.  
  55. A.  For various reasons, guavac C uses Unixlib.  For various other reasons,
  56.     Unxilib requires the use of the CallASWI module for certain operations.
  57.     CallASWI is built into Risc OS 3.7, but not previous versions and must
  58.     be loaded for guavac to operate.  In short, obtain a patch from
  59.     the Risc OS guavac homepage if you having this proglem.
  60.  
  61.  
  62. 4.  Why does guavac complain "No writable memory at this address"?
  63.  
  64. A.  The guavac executable requires 3Mb of memory.  You need to increase
  65.     your wimpslot to this.  If you are using a pre-Risc PC, you will need
  66.     more, since guavac will be unable to use dynamic areas for its heap.
  67.  
  68.  
  69. 5.  guavac says my source file is not a plain file or invalid source file,
  70.     what's wrong?
  71.  
  72. A.  Firstly, make sure you have the newest version of guavac - release 1
  73.     has difficulty finding files in the CSD. Otherwise, guavac can't find
  74.     your file, or you've used an illegal format for the filename.  If you
  75.     don't specify a full Risc OS path, guavac will look in the CSD.  Java
  76.     source files as understood by guavac must be either file/java or
  77.     java.file, where 'java.' in the second example is a directory.  For
  78.     the first format, you can give either of:
  79.  
  80.       guavac file.java
  81.  
  82.     or
  83.  
  84.       guavac file/java
  85.  
  86.     In the second, you must have:
  87.  
  88.       guavc java.file
  89.  
  90.     for it to be found.
  91.  
  92.  
  93. 6.  I've compiled my program, but !Java says it can't find my class, what's
  94.     going wrong?
  95.  
  96. A.  Acorn's Java is very picky about what it will do with Java classes.  It
  97.     will complain when:
  98.  
  99.     (a) The file !Java.lib.ClassesZip is an image file (change the filetype to
  100.         a textfile)
  101.     (b) The Java class does not have a "/class" extension (or as much as
  102.         will fit into a Risc OS filename).  This means you will want to
  103.         use the guavac -ext flag.
  104.     (c) The class you compiled was declared as public.  When you do this,
  105.         the filename must be the same as the class's name.  If you rename it
  106.         for whatever reason, !Java will complain.
  107.  
  108.  
  109. 7.  What is the format of the Java$ClassPath variable, and when do I need
  110.     to set it?
  111.  
  112. A.  Firstly, you won't need to set this unless you are doing something
  113.     unusual (this also applies to the -classpath flag).  If you do need
  114.     to set it, then the format is simply the full Risc OS path, although
  115.     you can use a Unix type path if you need to.  Note that !Java sets this
  116.     variable to point to !Java.lib.ClassesZip, and guavac will use this.
  117.  
  118.  
  119. 8.  Why will javac compile some things, but not guavac?
  120.  
  121. A.  There are somethings that guavac does not handle well (have a look at
  122.     !Guavac.doc.TODO) The best example is circular dependencies between classes.
  123.     A fix for this problem is to first compile a "minimal" version of one
  124.     of the two circular classes, then compile the second and finally
  125.     the full version of the first class.
  126.  
  127.  
  128. 9.  Why will guavac compile some things, but not javac?
  129.  
  130. A.  You're probably trying to compile Java 1.1 things like inner classes,
  131.     which are not supported in Java 1.0.2.
  132.  
  133.  
  134. 10. Why doesn't guavac do <<insert Risc OS bug/feature>>?
  135.  
  136. A.  Maybe it's a bug in either the port or the program itself.  Please
  137.     contact me with details, and if possible, the smallest amount
  138.     of Java source that reproduces the problem.  It may also be helpful
  139.     to know details of machine and OS.  If it looks like a "proper"
  140.     guavac bug rather than a Risc OS related one, try asking on the
  141.     guavac mailing list (see !Guavac.doc.NEWS for details).
  142.  
  143.  
  144. 11. Why doesn't throwback work?
  145.  
  146. A.  You need to have the DDEUtils module loaded for throwback to work,
  147.     and you will need a throwback-capable editor running such as StrongED
  148.     or Zap.
  149.  
  150.  
  151. 12. Is there a multi-tasking front end to guavac?
  152.  
  153. A.  Yes, one is included which uses Acorn's FrontEnd, which will run
  154.     when you double click on !Guavac.  I believe there are some others
  155.     around too.
  156.  
  157.  
  158. 13. What's a good book on to learn Java from?
  159.  
  160. A.  Try to get one that supports Java 1.1.  Some good books are:
  161.     "Java in a Nutshell" and "Special Edition Using Java".
  162.  
  163.  
  164. 14. What other Risc OS Java-related programs are available?
  165.  
  166. A.  Acorn's !Java, D-Java, a free Java bytecode dissasembler, ported by myself,
  167.     Chockcino (not yet released) my Java 1.1 Virtual machine.
  168.     See http://chocky.home.ml.org/java/ for information on D-Java and
  169.     Chockcino.  Don't forget my StrongED Java mode either, which
  170.     has a function to launch to guavac http://chocky.home.ml.org/software/
  171.  
  172.  
  173. 15. Where can I find more Risc OS related Java programming information?
  174.  
  175. A.  The Acorn newsgroups.  In pariticular, comp.sys.acorn.programmer.
  176.     You might also like to read my monthly series on Java programming
  177.     in RISC User.
  178.  
  179.     Acorn's Java FAQ:
  180.  
  181.     http://www.acorn.com/browser/faq/java.html
  182.  
  183.     Octopus Systems maintains a Java FAQ also:
  184.  
  185.     http://www.octosys.co.uk/java.html
  186.  
  187.  
  188.